package cn.scnu.mapper;

import cn.scnu.model.dto.*;
import cn.scnu.model.entity.BaiyunProjectListEntity;
import cn.scnu.model.query.KeyQueryParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author hqzqaq
 * @since 2024-12-18
 */
public interface BaiyunProjectListMapper extends BaseMapper<BaiyunProjectListEntity> {

    List<Integer> getYears();

    BaseKeyValueDTO<Integer, Double> getContractCountAndAmountByYear(Integer year);

    List<BaseKeyValueDTO<Integer, Integer>> getContractCountChangeByYear(Integer year);

    List<CountAndAmountForScbkDTO> getContractCountAndAmountForScbk(Integer year);

    List<String> getUniqueScbk(Integer year);

    List<BaseKeyValueDTO<String, Integer>> getContractCountForYwlx(Integer year, String scbk);

    List<BaseKeyValueDTO<String, Double>> getContractAmountForYwlx(Integer year, String scbk);

    List<ContractMonthAmountForYwlxByScbkDTO> getContractMonthAmountForYwlxByScbk(Integer year, String scbk, String ywlx);

    List<String> getUniqueYwlxByScbk(Integer year, String scbk);

    Double getReceiveAmount(Integer year);

    List<BaseKeyValueDTO<Integer, Double>> getMonthReceiveAmount(Integer year);

    List<BaseKeyValueDTO<String, Double>> getReceiveAmountForScbk(Integer year);

    List<BaseKeyValueDTO<String, Double>> getReceiveAmountForYelxByScbk(Integer year, String scbk);

    List<BaseKeyValueDTO<Integer, Double>> getMonthReceiveAmountForYelxByScbk(Integer year, String scbk, String ywlx);

    Double getProductionAmount(Integer year);

    List<BaseKeyValueDTO<String, Double>> getProductionAmountForScbk(Integer year);

    List<BaseKeyValueDTO<Integer, Double>> getMonthProductionAmount(Integer year);

    List<BaseKeyValueDTO<String, Double>> getProductionAmountForYelxByScbk(Integer year, String scbk);

    List<BaseKeyValueDTO<Integer, Double>> getMonthProductionAmountForYelxByScbk(Integer year, String scbk, String ywlx);

    DataDashProjectDTO getProjectIndex(Integer year);

    List<BaseKeyValueDTO<Integer, Integer>> getMonthProjectNum(Integer year);

    List<ProjectCountAndAmountForScbkDTO> getProjectCountAndAmountForScbk(Integer year);

    List<ProjectRaAndCaDTO> getProjectCountForYelxByScbk(Integer year, String scbk);

    List<NsfAndYsfForScbkDTO> getProjectNsfCountForYelxByScbk(Integer year, String scbk);

    List<ProjectDataFormDTO> getKeyList(@Param("keyQueryParam") KeyQueryParam keyQueryParam);

    List<ProjectCountAndAmountForYwlxDTO> getProjectIndexForYwlxByTown(Integer year, String townName, String ywhj, List<String> ywlxList);

    List<String> getUniqueYwlxByYwhj(Integer year, String townName, String ywhj);

    List<BaseKeyValueDTO<Integer, Integer>> getMonthProjectCaseCount(Integer year);

    List<BaseKeyValueDTO<Integer, Double>> getMonthProjectPlannedCharge(Integer year);

    List<BaseKeyValueDTO<Integer, Double>> getContractAmountChangeByYear(Integer year);

    List<ProjectDataFormDTO> getProjectForYwlxExport(Integer year, String townName, List<String> ywhjList);
}
